package dongshi.daddy.bridge;

import dongshi.daddy.bridge.goodmethod.abstractt.LargeCoffee;
import dongshi.daddy.bridge.goodmethod.abstractt.RefinedCoffee;
import dongshi.daddy.bridge.goodmethod.abstractt.SmallCoffee;
import dongshi.daddy.bridge.goodmethod.implementor.Milk;
import dongshi.daddy.bridge.goodmethod.implementor.Sugar;
import org.junit.Test;

public class BridgeTest {
    public static void main(String[] args) {
        //点两杯加奶的大杯咖啡
        RefinedCoffee largeWithMilk = new LargeCoffee(new Milk());
        largeWithMilk.orderCoffee(2);
//        largeWithMilk.checkQuality();
    }

    // 两大杯加奶
    @Test
    public void testCase1() {
        RefinedCoffee largeWithMilk = new LargeCoffee(new Milk());
        largeWithMilk.orderCoffee(2);
    }

    // 8小杯加糖
    @Test
    public void testCase2() {
        SmallCoffee smallCoffee = new SmallCoffee(new Sugar());
        smallCoffee.orderCoffee(8);
    }

}
